package com.hqyj.lyf.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("user")
public class User {
    @TableId(value = "user_id",type = IdType.AUTO)
    protected Integer userId;
    @TableField(value = "name")
    private String name;
    @TableField(value = "sex")
    private String sex;
    @TableField(value = "username",updateStrategy = FieldStrategy.NEVER)// 不用更新用户名
    private String username;
    @TableField(value = "password")
    private String password;
    @TableField(value = "phone")
    private String phone;
    @TableField(value = "user_role_id", updateStrategy = FieldStrategy.NEVER,insertStrategy = FieldStrategy.NEVER)
    private Integer userRoleId;
    @TableField(exist = false)
    private Role role;
}
